package com.texaco.chapasFutbol.multiplayer.mensajes;

import org.json.JSONException;

public class ExampleMessage extends BaseMessage{

	private static final long serialVersionUID = -423455328744473096L;
	String campo;
	
	public ExampleMessage(String jsonString) throws JSONException{
		super(MESSAGE_EXAMPLE, jsonString);
	}
	
	public ExampleMessage() throws JSONException{
		super(MESSAGE_EXAMPLE);
	}
	
	public void preRead() {
		try {
			campo = message.getString("campo");
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public void preWrite() {
		try {
			message.put("campo", campo);
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}
}